From f5a3db562b511e84611f0f1fc078b5c6b7e4a789 Mon Sep 17 00:00:00 2001 From: "robertlipe@gmail.com" Date: Sun, 18 Nov 2012 18:38:02 +0000 Subject: [PATCH] Steve spiffs up makelinuxdist for the GUI. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4204 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/Makefile.in | 13 +++++--- gpsbabel/configure | 11 +++++-- gpsbabel/configure.in | 3 +- gpsbabel/gui/makelinuxdist.sh.in | 56 ++++++++++---------------------- gpsbabel/tools/mac-localize | 3 +- gpsbabel/xcsv_tokens.gperf | 6 ++-- 6 files changed, 42 insertions(+), 50 deletions(-) diff --git a/gpsbabel/Makefile.in b/gpsbabel/Makefile.in index e35c858f4..1fbfbe6bc 100644 --- a/gpsbabel/Makefile.in +++ b/gpsbabel/Makefile.in @@ -136,6 +136,7 @@ fileinfo.o: win32/gpsbabel.rc clean: rm -f $(OBJS) gpsbabel gpsbabel.exe + [ -f gui/Makefile ] && $(MAKE) -C gui clean configure: configure.in autoconf @@ -348,13 +349,17 @@ mac-release: tar cvzf gpsbabel-osx.tgz usr/bin/gpsbabel curl -u anonymous:anonymous --upload-file gpsbabel-osx.tgz ftp://upload.sf.net/incoming/ - -mac-gui: gpsbabel - # file gpsbabel | grep '2 architectures' || exit 1 - # file gui/objects/GPSBabelFE.app/Contents/MacOS/GPSBabelFE | grep '2 architectures' || exit 1 +gui: gpsbabel cd gui ; qmake && make cd gui ; lupdate app.pro cd gui ; lrelease app.pro + +linux-gui: gui + cd gui; ./makelinuxdist.sh + +mac-gui: gui + # file gpsbabel | grep '2 architectures' || exit 1 + # file gui/objects/GPSBabelFE.app/Contents/MacOS/GPSBabelFE | grep '2 architectures' || exit 1 mkdir -p gui/objects/GPSBabelFE.app/Contents/MacOS/translations cp gui/*.qm gui/objects/gpsbabelFE.app/Contents/MacOS/translations cp gpsbabel gui/objects/GPSBabelFE.app/Contents/MacOS diff --git a/gpsbabel/configure b/gpsbabel/configure index 14c156a9f..a6717979a 100755 --- a/gpsbabel/configure +++ b/gpsbabel/configure @@ -4985,7 +4985,9 @@ else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -ac_config_files="$ac_config_files Makefile gbversion.h gui/setup.iss gui/makelinuxdist.sh xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty" +ac_config_files="$ac_config_files Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty" + +ac_config_files="$ac_config_files gui/makelinuxdist.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5544,13 +5546,13 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "gbversion.h") CONFIG_FILES="$CONFIG_FILES gbversion.h" ;; "gui/setup.iss") CONFIG_FILES="$CONFIG_FILES gui/setup.iss" ;; - "gui/makelinuxdist.sh") CONFIG_FILES="$CONFIG_FILES gui/makelinuxdist.sh" ;; "xmldoc/makedoc") CONFIG_FILES="$CONFIG_FILES xmldoc/makedoc" ;; "tools/mkcapabilities") CONFIG_FILES="$CONFIG_FILES tools/mkcapabilities" ;; "win32/gpsbabel.rc") CONFIG_FILES="$CONFIG_FILES win32/gpsbabel.rc" ;; "jeeps/Makefile") CONFIG_FILES="$CONFIG_FILES jeeps/Makefile" ;; "shapelib/Makefile") CONFIG_FILES="$CONFIG_FILES shapelib/Makefile" ;; "zlib/empty") CONFIG_FILES="$CONFIG_FILES zlib/empty" ;; + "gui/makelinuxdist.sh") CONFIG_FILES="$CONFIG_FILES gui/makelinuxdist.sh" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -6099,6 +6101,11 @@ echo "$as_me: $ac_file is unchanged" >&6;} esac + + case $ac_file$ac_mode in + "gui/makelinuxdist.sh":F) chmod +x gui/makelinuxdist.sh ;; + + esac done # for ac_tag diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index 5890dde3d..661b5d6b3 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -429,6 +429,7 @@ if test "$ac_cv_valistisarray" = true ; then else AC_MSG_RESULT(no) fi -AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss gui/makelinuxdist.sh xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty]) +AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty]) +AC_CONFIG_FILES([gui/makelinuxdist.sh], [chmod +x gui/makelinuxdist.sh]) AC_OUTPUT diff --git a/gpsbabel/gui/makelinuxdist.sh.in b/gpsbabel/gui/makelinuxdist.sh.in index e41c26a5d..94b6e1ff7 100644 --- a/gpsbabel/gui/makelinuxdist.sh.in +++ b/gpsbabel/gui/makelinuxdist.sh.in @@ -1,7 +1,7 @@ #!/bin/sh set -e -v -QTLIBDIR=/usr/lib -QTSHDIR=/usr/share/qt4 +QT_INSTALL_PLUGINS=`qmake -query QT_INSTALL_PLUGINS` +QT_INSTALL_TRANSLATIONS=`qmake -query QT_INSTALL_TRANSLATIONS` DISTNAME=GPSBabel@PACKAGE_VERSION@@PACKAGE_RELEASE@ DISTDIR=$DISTNAME @@ -11,37 +11,20 @@ mkdir $DISTDIR/plugins mkdir $DISTDIR/translations mkdir $DISTDIR/help -cp `ldd objects/gpsbabelfe-bin | grep libQtCore |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libQtGui |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libQtWebKit |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libQtXml |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libQtNetwork |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libQtDBus |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libphonon |awk '{print $3}'` $DISTDIR -cp `ldd objects/gpsbabelfe-bin | grep libaudio |awk '{print $3}'` $DISTDIR +QT_LIBS=`ldd objects/gpsbabelfe-bin | grep libQt | awk '{print $3}'` +for lib in $QT_LIBS +do + cp $lib $DISTDIR +done +#cp `ldd objects/gpsbabelfe-bin | grep libphonon |awk '{print $3}'` $DISTDIR +#cp `ldd objects/gpsbabelfe-bin | grep libaudio |awk '{print $3}'` $DISTDIR -cp -r $QTSHDIR/plugins/imageformats $DISTDIR/plugins -cp $QTSHDIR/translations/qt_*.qm $DISTDIR/translations/ +cp -r $QT_INSTALL_PLUGINS/imageformats $DISTDIR/plugins +cp -r $QT_INSTALL_PLUGINS/codecs $DISTDIR/plugins +cp $QT_INSTALL_TRANSLATIONS/qt_*.qm $DISTDIR/translations/ -# Generate the compiled translations -TSFILES="gpsbabel_de.ts -gpsbabel_es.ts -gpsbabel_fr.ts -gpsbabel_hu.ts -gpsbabel_it.ts -gpsbabelfe_de.ts -gpsbabelfe_es.ts -gpsbabelfe_fr.ts -gpsbabelfe_hu.ts -gpsbabelfe_it.ts" - -# -lrelease $TSFILES -QMFILES=`echo $TSFILES | sed -e 's/\.ts/.qm/g'` -cp $TSFILES $DISTDIR/translations -# -# Only Spanish and German are moderately OK. -cp gpsbabel_es.ts gpsbabelfe_es.ts gpsbabel_de.ts gpsbabelfe_de.ts $DISTDIR/translations +# copy the compiled translations +cp *.qm $DISTDIR/translations # Now our gui cp gmapbase.html $DISTDIR/ @@ -51,19 +34,14 @@ cp objects/gpsbabelfe-bin $DISTDIR cp qt.conf $DISTDIR/ cp ../gpsbabel $DISTDIR/ # -# Help needs to be donea -cp ../../babelweb/htmldoc-development/* $DISTDIR/help/ +cp -r help/*.html $DISTDIR/help -cp COPYING $DISTDIR/ +cp ../COPYING $DISTDIR/ #cp AUTHORS $DISTDIR/ -#cp README.contrib $DISTDIR/ -#cp README.gui $DISTDIR/ +cp ../README* $DISTDIR/ rm -f $DISTDIR.tar $DISTDIR.tar.bz2 tar cvf $DISTDIR.tar $DISTDIR bzip2 $DISTDIR.tar -# cleanup needed -echo $QMFILES -rm -f $QMFILES diff --git a/gpsbabel/tools/mac-localize b/gpsbabel/tools/mac-localize index 660dbc202..5cf319af2 100755 --- a/gpsbabel/tools/mac-localize +++ b/gpsbabel/tools/mac-localize @@ -2,7 +2,8 @@ # the application menu and system buttons. See description at # http://doc.qt.nokia.com/4.6/mac-differences.html#translating-the-application-menu-and-native-dialogs -QTDIR="/Developer/Applications/Qt/Qt Creator.app/Contents/Resources/translations" +QTDIR=`qmake -query QT_INSTALL_TRANSLATIONS` + LANGDIR=objects/GPSBabelFE.app/Contents/MacOS/translations diff --git a/gpsbabel/xcsv_tokens.gperf b/gpsbabel/xcsv_tokens.gperf index cba3530c6..b650d5b75 100644 --- a/gpsbabel/xcsv_tokens.gperf +++ b/gpsbabel/xcsv_tokens.gperf @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.4 */ +/* ANSI-C code produced by gperf version 3.0.3 */ /* Command-line: gperf --output-file=xcsv_tokens.gperf -L ANSI-C -D -t xcsv_tokens.in */ /* Computed positions: -k'2,4-5,12,$' */ @@ -30,7 +30,7 @@ #endif #line 1 "xcsv_tokens.in" -struct xt_mapping {char *name; int xt_token; }; +struct xt_mapping {const char *name; int xt_token; }; #define TOTAL_KEYWORDS 86 #define MIN_WORD_LENGTH 3 @@ -107,7 +107,7 @@ hash (register const char *str, register unsigned int len) #ifdef __GNUC__ __inline -#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +#ifdef __GNUC_STDC_INLINE__ __attribute__ ((__gnu_inline__)) #endif #endif -- 2.30.2